@extends('admin.superadmin.layout.layout')
@section('content')
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">作者分配</h1>
        </div>        
    </div>
    
    <div class="col-lg-12">
        <div class="panel panel-default">   
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6 col-lg-offset-3">

                        
                        
                        @if (count($errors) > 0)
                            <div class="alert alert-danger">
                            <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                            </ul>
                            </div>
                        @endif  
                        <form action="{{'/admin/superadmin/author/update'}}" method="post">
                        <div class="panel-body">
                            <div class="table-responsive">
                               <div class="form-group">
                                    <label>编辑</label>
                                   

                                    <select class="form-control" name="eid">
                                     @foreach($user as $k=>$v)
                                        <option value="{{$v->id}}">{{$v->e_name}}&nbsp;&nbsp;&nbsp;(已有{{$v->num}}个作者)</option>
                                     @endforeach 
                                    </select>
                                   
                                </div>
                                    <input class="form-control" id="disabledInput" type="text" value="{{$author->name}}" disabled="">
                                    <input type="hidden" name="aid" value="{{$author->id}}">
                                 <br>
                                 <button type="" class="btn btn-success btn-lg btn-block">分配</button>
                                
                            </div>
                           
                            {{csrf_field()}}
                        </div>
                        </form>
                    </div>
                    </div>
                    <!-- /.col-lg-6 (nested) -->
                </div>
                <!-- /.row (nested) -->
            </div>

            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div> 

@endsection                    
